using System;
using System.ComponentModel;
using System.Collections;
using System.Diagnostics;
using System.Data;
using System.Data.SqlClient;
using System.Xml;
using System.Reflection;
using Microsoft.Win32;
using System.IO;
using Srvtools;
using System.Security;
using System.Security.Permissions;
using System.Threading;

namespace sPpoPo1
{
    /// <summary>
    /// Summary description for Component.
    /// </summary>
    public class Component : DataModule
    {
        private ServiceManager serviceManager;
        private InfoConnection InfoConnection1;
        private InfoCommand PPO_PO1_M;
        private UpdateComponent ucPPO_PO1_M;
        private InfoCommand PPO_PO1_D;
        private UpdateComponent ucPPO_PO1_D;
        private InfoDataSource idPPO_PO1_M_PPO_PO1_D;
        private InfoCommand View_Provider;
        private AutoNumber NO_PO;
        private InfoTransaction tsQTY_PO1;
        private InfoCommand PR1_D;
        private InfoCommand MasterView;
        private InfoCommand RPT_Master;
        private InfoCommand RPT_Detail;
        private InfoDataSource infoDataSource1;
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components;

        public Component(System.ComponentModel.IContainer container)
        {
            ///
            /// Required for Windows.Forms Class Composition Designer support
            ///
            container.Add(this);
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        public Component()
        {
            ///
            /// This call is required by the Windows.Forms Designer.
            ///
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

        /// <summary> 
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }
            }
            base.Dispose(disposing);
        }

        public string GetFixed()
        {
            return string.Format("PO{0:yyMM}", DateTime.Now.Date);
        }

        #region Component Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            Srvtools.KeyItem keyItem1 = new Srvtools.KeyItem();
            Srvtools.FieldAttr fieldAttr1 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr2 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr3 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr4 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr5 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr6 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr7 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr8 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr9 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr10 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr11 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr12 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr13 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr14 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr15 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr16 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr17 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr18 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr19 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr20 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr21 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr22 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr23 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr24 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr25 = new Srvtools.FieldAttr();
            Srvtools.KeyItem keyItem2 = new Srvtools.KeyItem();
            Srvtools.KeyItem keyItem3 = new Srvtools.KeyItem();
            Srvtools.KeyItem keyItem4 = new Srvtools.KeyItem();
            Srvtools.FieldAttr fieldAttr26 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr27 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr28 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr29 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr30 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr31 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr32 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr33 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr34 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr35 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr36 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr37 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr38 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr39 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr40 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr41 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr42 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr43 = new Srvtools.FieldAttr();
            Srvtools.FieldAttr fieldAttr44 = new Srvtools.FieldAttr();
            Srvtools.ColumnItem columnItem1 = new Srvtools.ColumnItem();
            Srvtools.ColumnItem columnItem2 = new Srvtools.ColumnItem();
            Srvtools.KeyItem keyItem5 = new Srvtools.KeyItem();
            Srvtools.Transaction transaction1 = new Srvtools.Transaction();
            Srvtools.TransField transField1 = new Srvtools.TransField();
            Srvtools.TransKeyField transKeyField1 = new Srvtools.TransKeyField();
            Srvtools.TransKeyField transKeyField2 = new Srvtools.TransKeyField();
            Srvtools.TransKeyField transKeyField3 = new Srvtools.TransKeyField();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Component));
            Srvtools.KeyItem keyItem6 = new Srvtools.KeyItem();
            Srvtools.KeyItem keyItem7 = new Srvtools.KeyItem();
            Srvtools.KeyItem keyItem8 = new Srvtools.KeyItem();
            Srvtools.KeyItem keyItem9 = new Srvtools.KeyItem();
            Srvtools.KeyItem keyItem10 = new Srvtools.KeyItem();
            Srvtools.KeyItem keyItem11 = new Srvtools.KeyItem();
            Srvtools.ColumnItem columnItem3 = new Srvtools.ColumnItem();
            Srvtools.ColumnItem columnItem4 = new Srvtools.ColumnItem();
            this.serviceManager = new Srvtools.ServiceManager(this.components);
            this.InfoConnection1 = new Srvtools.InfoConnection();
            this.PPO_PO1_M = new Srvtools.InfoCommand(this.components);
            this.ucPPO_PO1_M = new Srvtools.UpdateComponent(this.components);
            this.PPO_PO1_D = new Srvtools.InfoCommand(this.components);
            this.ucPPO_PO1_D = new Srvtools.UpdateComponent(this.components);
            this.idPPO_PO1_M_PPO_PO1_D = new Srvtools.InfoDataSource(this.components);
            this.View_Provider = new Srvtools.InfoCommand(this.components);
            this.NO_PO = new Srvtools.AutoNumber(this.components);
            this.tsQTY_PO1 = new Srvtools.InfoTransaction(this.components);
            this.PR1_D = new Srvtools.InfoCommand(this.components);
            this.MasterView = new Srvtools.InfoCommand(this.components);
            this.RPT_Master = new Srvtools.InfoCommand(this.components);
            this.RPT_Detail = new Srvtools.InfoCommand(this.components);
            this.infoDataSource1 = new Srvtools.InfoDataSource(this.components);
            ((System.ComponentModel.ISupportInitialize)(this.InfoConnection1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.PPO_PO1_M)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.PPO_PO1_D)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.View_Provider)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.PR1_D)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.MasterView)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.RPT_Master)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.RPT_Detail)).BeginInit();
            // 
            // InfoConnection1
            // 
            this.InfoConnection1.ConnectionType = Srvtools.ConnectionType.SqlClient;
            this.InfoConnection1.EEPAlias = "ERPS";
            // 
            // PPO_PO1_M
            // 
            this.PPO_PO1_M.CommandText = "SELECT * FROM [PPO_PO1_M] where CD_PO2=\'1\'";
            this.PPO_PO1_M.CommandTimeout = 30;
            this.PPO_PO1_M.CommandType = System.Data.CommandType.Text;
            this.PPO_PO1_M.EEPAlias = null;
            this.PPO_PO1_M.InfoConnection = this.InfoConnection1;
            keyItem1.KeyName = "NO_PO";
            this.PPO_PO1_M.KeyFields.Add(keyItem1);
            this.PPO_PO1_M.Name = "PPO_PO1_M";
            this.PPO_PO1_M.NotificationAutoEnlist = false;
            this.PPO_PO1_M.SecExcept = null;
            this.PPO_PO1_M.SecFieldName = null;
            this.PPO_PO1_M.SecStyle = Srvtools.SecurityStyle.ssByNone;
            this.PPO_PO1_M.SelectTop = 0;
            this.PPO_PO1_M.SiteControl = false;
            this.PPO_PO1_M.SiteFieldName = null;
            this.PPO_PO1_M.Transaction = null;
            this.PPO_PO1_M.UpdatedRowSource = System.Data.UpdateRowSource.Both;
            // 
            // ucPPO_PO1_M
            // 
            this.ucPPO_PO1_M.AutoTrans = true;
            this.ucPPO_PO1_M.ExceptJoin = false;
            fieldAttr1.CheckNull = true;
            fieldAttr1.DataField = "NO_PO";
            fieldAttr1.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr1.DefaultValue = null;
            fieldAttr1.UpdateEnable = true;
            fieldAttr1.WhereMode = true;
            fieldAttr2.CheckNull = false;
            fieldAttr2.DataField = "DT_PO";
            fieldAttr2.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr2.DefaultValue = null;
            fieldAttr2.UpdateEnable = true;
            fieldAttr2.WhereMode = true;
            fieldAttr3.CheckNull = false;
            fieldAttr3.DataField = "CD_PO";
            fieldAttr3.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr3.DefaultValue = null;
            fieldAttr3.UpdateEnable = true;
            fieldAttr3.WhereMode = true;
            fieldAttr4.CheckNull = false;
            fieldAttr4.DataField = "ID_PUR";
            fieldAttr4.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr4.DefaultValue = null;
            fieldAttr4.UpdateEnable = true;
            fieldAttr4.WhereMode = true;
            fieldAttr5.CheckNull = false;
            fieldAttr5.DataField = "ID_VEND";
            fieldAttr5.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr5.DefaultValue = null;
            fieldAttr5.UpdateEnable = true;
            fieldAttr5.WhereMode = true;
            fieldAttr6.CheckNull = false;
            fieldAttr6.DataField = "NO_CONTACT";
            fieldAttr6.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr6.DefaultValue = null;
            fieldAttr6.UpdateEnable = true;
            fieldAttr6.WhereMode = true;
            fieldAttr7.CheckNull = false;
            fieldAttr7.DataField = "ID_CURR";
            fieldAttr7.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr7.DefaultValue = null;
            fieldAttr7.UpdateEnable = true;
            fieldAttr7.WhereMode = true;
            fieldAttr8.CheckNull = false;
            fieldAttr8.DataField = "RI_EXCHG";
            fieldAttr8.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr8.DefaultValue = null;
            fieldAttr8.UpdateEnable = true;
            fieldAttr8.WhereMode = true;
            fieldAttr9.CheckNull = false;
            fieldAttr9.DataField = "CD_TAX";
            fieldAttr9.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr9.DefaultValue = null;
            fieldAttr9.UpdateEnable = true;
            fieldAttr9.WhereMode = true;
            fieldAttr10.CheckNull = false;
            fieldAttr10.DataField = "AM_CURRENCY";
            fieldAttr10.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr10.DefaultValue = null;
            fieldAttr10.UpdateEnable = true;
            fieldAttr10.WhereMode = true;
            fieldAttr11.CheckNull = false;
            fieldAttr11.DataField = "AM_TAX";
            fieldAttr11.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr11.DefaultValue = null;
            fieldAttr11.UpdateEnable = true;
            fieldAttr11.WhereMode = true;
            fieldAttr12.CheckNull = false;
            fieldAttr12.DataField = "AM_TOTAL";
            fieldAttr12.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr12.DefaultValue = null;
            fieldAttr12.UpdateEnable = true;
            fieldAttr12.WhereMode = true;
            fieldAttr13.CheckNull = false;
            fieldAttr13.DataField = "ID_PAY";
            fieldAttr13.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr13.DefaultValue = null;
            fieldAttr13.UpdateEnable = true;
            fieldAttr13.WhereMode = true;
            fieldAttr14.CheckNull = false;
            fieldAttr14.DataField = "ID_WH";
            fieldAttr14.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr14.DefaultValue = null;
            fieldAttr14.UpdateEnable = true;
            fieldAttr14.WhereMode = true;
            fieldAttr15.CheckNull = false;
            fieldAttr15.DataField = "ID_CUST";
            fieldAttr15.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr15.DefaultValue = null;
            fieldAttr15.UpdateEnable = true;
            fieldAttr15.WhereMode = true;
            fieldAttr16.CheckNull = false;
            fieldAttr16.DataField = "ID_ADDR";
            fieldAttr16.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr16.DefaultValue = null;
            fieldAttr16.UpdateEnable = true;
            fieldAttr16.WhereMode = true;
            fieldAttr17.CheckNull = false;
            fieldAttr17.DataField = "CD_DELV";
            fieldAttr17.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr17.DefaultValue = null;
            fieldAttr17.UpdateEnable = true;
            fieldAttr17.WhereMode = true;
            fieldAttr18.CheckNull = false;
            fieldAttr18.DataField = "RM_MEMO";
            fieldAttr18.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr18.DefaultValue = null;
            fieldAttr18.UpdateEnable = true;
            fieldAttr18.WhereMode = true;
            fieldAttr19.CheckNull = false;
            fieldAttr19.DataField = "FG_CLOSE";
            fieldAttr19.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr19.DefaultValue = null;
            fieldAttr19.UpdateEnable = true;
            fieldAttr19.WhereMode = true;
            fieldAttr20.CheckNull = false;
            fieldAttr20.DataField = "CREATE_USER";
            fieldAttr20.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr20.DefaultValue = null;
            fieldAttr20.UpdateEnable = true;
            fieldAttr20.WhereMode = true;
            fieldAttr21.CheckNull = false;
            fieldAttr21.DataField = "CREATE_DATE";
            fieldAttr21.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr21.DefaultValue = null;
            fieldAttr21.UpdateEnable = true;
            fieldAttr21.WhereMode = true;
            fieldAttr22.CheckNull = false;
            fieldAttr22.DataField = "CREATE_TIME";
            fieldAttr22.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr22.DefaultValue = null;
            fieldAttr22.UpdateEnable = true;
            fieldAttr22.WhereMode = true;
            fieldAttr23.CheckNull = false;
            fieldAttr23.DataField = "UPDATE_USER";
            fieldAttr23.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr23.DefaultValue = null;
            fieldAttr23.UpdateEnable = true;
            fieldAttr23.WhereMode = true;
            fieldAttr24.CheckNull = false;
            fieldAttr24.DataField = "UPDATE_DATE";
            fieldAttr24.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr24.DefaultValue = null;
            fieldAttr24.UpdateEnable = true;
            fieldAttr24.WhereMode = true;
            fieldAttr25.CheckNull = false;
            fieldAttr25.DataField = "UPDATE_TIME";
            fieldAttr25.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr25.DefaultValue = null;
            fieldAttr25.UpdateEnable = true;
            fieldAttr25.WhereMode = true;
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr1);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr2);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr3);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr4);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr5);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr6);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr7);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr8);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr9);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr10);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr11);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr12);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr13);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr14);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr15);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr16);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr17);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr18);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr19);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr20);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr21);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr22);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr23);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr24);
            this.ucPPO_PO1_M.FieldAttrs.Add(fieldAttr25);
            this.ucPPO_PO1_M.LogInfo = null;
            this.ucPPO_PO1_M.Name = "ucPPO_PO1_M";
            this.ucPPO_PO1_M.SelectCmd = this.PPO_PO1_M;
            this.ucPPO_PO1_M.ServerModify = true;
            this.ucPPO_PO1_M.ServerModifyGetMax = false;
            this.ucPPO_PO1_M.TransIsolationLevel = System.Data.IsolationLevel.ReadCommitted;
            this.ucPPO_PO1_M.WhereMode = Srvtools.WhereModeType.Keyfields;
            // 
            // PPO_PO1_D
            // 
            this.PPO_PO1_D.CommandText = "SELECT * FROM [PPO_PO1_D]";
            this.PPO_PO1_D.CommandTimeout = 30;
            this.PPO_PO1_D.CommandType = System.Data.CommandType.Text;
            this.PPO_PO1_D.EEPAlias = null;
            this.PPO_PO1_D.InfoConnection = this.InfoConnection1;
            keyItem2.KeyName = "NO_PO";
            keyItem3.KeyName = "CN_SEQ";
            keyItem4.KeyName = "NO_PR";
            this.PPO_PO1_D.KeyFields.Add(keyItem2);
            this.PPO_PO1_D.KeyFields.Add(keyItem3);
            this.PPO_PO1_D.KeyFields.Add(keyItem4);
            this.PPO_PO1_D.Name = "PPO_PO1_D";
            this.PPO_PO1_D.NotificationAutoEnlist = false;
            this.PPO_PO1_D.SecExcept = null;
            this.PPO_PO1_D.SecFieldName = null;
            this.PPO_PO1_D.SecStyle = Srvtools.SecurityStyle.ssByNone;
            this.PPO_PO1_D.SelectTop = 0;
            this.PPO_PO1_D.SiteControl = false;
            this.PPO_PO1_D.SiteFieldName = null;
            this.PPO_PO1_D.Transaction = null;
            this.PPO_PO1_D.UpdatedRowSource = System.Data.UpdateRowSource.Both;
            // 
            // ucPPO_PO1_D
            // 
            this.ucPPO_PO1_D.AutoTrans = true;
            this.ucPPO_PO1_D.ExceptJoin = false;
            fieldAttr26.CheckNull = true;
            fieldAttr26.DataField = "NO_PO";
            fieldAttr26.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr26.DefaultValue = null;
            fieldAttr26.UpdateEnable = true;
            fieldAttr26.WhereMode = true;
            fieldAttr27.CheckNull = true;
            fieldAttr27.DataField = "CN_SEQ";
            fieldAttr27.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr27.DefaultValue = null;
            fieldAttr27.UpdateEnable = true;
            fieldAttr27.WhereMode = true;
            fieldAttr28.CheckNull = false;
            fieldAttr28.DataField = "NO_ITEM";
            fieldAttr28.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr28.DefaultValue = null;
            fieldAttr28.UpdateEnable = true;
            fieldAttr28.WhereMode = true;
            fieldAttr29.CheckNull = false;
            fieldAttr29.DataField = "NM_ITEM";
            fieldAttr29.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr29.DefaultValue = null;
            fieldAttr29.UpdateEnable = true;
            fieldAttr29.WhereMode = true;
            fieldAttr30.CheckNull = false;
            fieldAttr30.DataField = "QT_PUR_END";
            fieldAttr30.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr30.DefaultValue = null;
            fieldAttr30.UpdateEnable = true;
            fieldAttr30.WhereMode = true;
            fieldAttr31.CheckNull = false;
            fieldAttr31.DataField = "QT_QTY";
            fieldAttr31.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr31.DefaultValue = null;
            fieldAttr31.UpdateEnable = true;
            fieldAttr31.WhereMode = true;
            fieldAttr32.CheckNull = false;
            fieldAttr32.DataField = "CD_IMUM";
            fieldAttr32.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr32.DefaultValue = null;
            fieldAttr32.UpdateEnable = true;
            fieldAttr32.WhereMode = true;
            fieldAttr33.CheckNull = false;
            fieldAttr33.DataField = "PR_SALES";
            fieldAttr33.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr33.DefaultValue = null;
            fieldAttr33.UpdateEnable = true;
            fieldAttr33.WhereMode = true;
            fieldAttr34.CheckNull = false;
            fieldAttr34.DataField = "AM_SALES";
            fieldAttr34.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr34.DefaultValue = null;
            fieldAttr34.UpdateEnable = true;
            fieldAttr34.WhereMode = true;
            fieldAttr35.CheckNull = false;
            fieldAttr35.DataField = "CD_PO";
            fieldAttr35.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr35.DefaultValue = null;
            fieldAttr35.UpdateEnable = true;
            fieldAttr35.WhereMode = true;
            fieldAttr36.CheckNull = false;
            fieldAttr36.DataField = "NO_PR";
            fieldAttr36.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr36.DefaultValue = null;
            fieldAttr36.UpdateEnable = true;
            fieldAttr36.WhereMode = true;
            fieldAttr37.CheckNull = false;
            fieldAttr37.DataField = "NO_ORDER";
            fieldAttr37.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr37.DefaultValue = null;
            fieldAttr37.UpdateEnable = true;
            fieldAttr37.WhereMode = true;
            fieldAttr38.CheckNull = false;
            fieldAttr38.DataField = "NO_INQ";
            fieldAttr38.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr38.DefaultValue = null;
            fieldAttr38.UpdateEnable = true;
            fieldAttr38.WhereMode = true;
            fieldAttr39.CheckNull = false;
            fieldAttr39.DataField = "CREATE_USER";
            fieldAttr39.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr39.DefaultValue = null;
            fieldAttr39.UpdateEnable = true;
            fieldAttr39.WhereMode = true;
            fieldAttr40.CheckNull = false;
            fieldAttr40.DataField = "CREATE_DATE";
            fieldAttr40.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr40.DefaultValue = null;
            fieldAttr40.UpdateEnable = true;
            fieldAttr40.WhereMode = true;
            fieldAttr41.CheckNull = false;
            fieldAttr41.DataField = "CREATE_TIME";
            fieldAttr41.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr41.DefaultValue = null;
            fieldAttr41.UpdateEnable = true;
            fieldAttr41.WhereMode = true;
            fieldAttr42.CheckNull = false;
            fieldAttr42.DataField = "UPDATE_USER";
            fieldAttr42.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr42.DefaultValue = null;
            fieldAttr42.UpdateEnable = true;
            fieldAttr42.WhereMode = true;
            fieldAttr43.CheckNull = false;
            fieldAttr43.DataField = "UPDATE_DATE";
            fieldAttr43.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr43.DefaultValue = null;
            fieldAttr43.UpdateEnable = true;
            fieldAttr43.WhereMode = true;
            fieldAttr44.CheckNull = false;
            fieldAttr44.DataField = "UPDATE_TIME";
            fieldAttr44.DefaultMode = Srvtools.DefaultModeType.Insert;
            fieldAttr44.DefaultValue = null;
            fieldAttr44.UpdateEnable = true;
            fieldAttr44.WhereMode = true;
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr26);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr27);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr28);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr29);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr30);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr31);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr32);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr33);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr34);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr35);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr36);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr37);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr38);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr39);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr40);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr41);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr42);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr43);
            this.ucPPO_PO1_D.FieldAttrs.Add(fieldAttr44);
            this.ucPPO_PO1_D.LogInfo = null;
            this.ucPPO_PO1_D.Name = "ucPPO_PO1_D";
            this.ucPPO_PO1_D.SelectCmd = this.PPO_PO1_D;
            this.ucPPO_PO1_D.ServerModify = true;
            this.ucPPO_PO1_D.ServerModifyGetMax = false;
            this.ucPPO_PO1_D.TransIsolationLevel = System.Data.IsolationLevel.ReadCommitted;
            this.ucPPO_PO1_D.WhereMode = Srvtools.WhereModeType.Keyfields;
            // 
            // idPPO_PO1_M_PPO_PO1_D
            // 
            this.idPPO_PO1_M_PPO_PO1_D.Detail = this.PPO_PO1_D;
            columnItem1.FieldName = "NO_PO";
            this.idPPO_PO1_M_PPO_PO1_D.DetailColumns.Add(columnItem1);
            this.idPPO_PO1_M_PPO_PO1_D.DynamicTableName = false;
            this.idPPO_PO1_M_PPO_PO1_D.Master = this.PPO_PO1_M;
            columnItem2.FieldName = "NO_PO";
            this.idPPO_PO1_M_PPO_PO1_D.MasterColumns.Add(columnItem2);
            // 
            // View_Provider
            // 
            this.View_Provider.CommandText = "SELECT * FROM [PPO_PO1_M]";
            this.View_Provider.CommandTimeout = 30;
            this.View_Provider.CommandType = System.Data.CommandType.Text;
            this.View_Provider.EEPAlias = null;
            this.View_Provider.InfoConnection = this.InfoConnection1;
            keyItem5.KeyName = "NO_PO";
            this.View_Provider.KeyFields.Add(keyItem5);
            this.View_Provider.Name = "View_Provider";
            this.View_Provider.NotificationAutoEnlist = false;
            this.View_Provider.SecExcept = null;
            this.View_Provider.SecFieldName = null;
            this.View_Provider.SecStyle = Srvtools.SecurityStyle.ssByNone;
            this.View_Provider.SelectTop = 0;
            this.View_Provider.SiteControl = false;
            this.View_Provider.SiteFieldName = null;
            this.View_Provider.Transaction = null;
            this.View_Provider.UpdatedRowSource = System.Data.UpdateRowSource.Both;
            // 
            // NO_PO
            // 
            this.NO_PO.Active = true;
            this.NO_PO.AutoNoID = "NO_PO";
            this.NO_PO.Description = null;
            this.NO_PO.GetFixed = "GetFixed()";
            this.NO_PO.isNumFill = false;
            this.NO_PO.Name = "NO_PO";
            this.NO_PO.Number = null;
            this.NO_PO.NumDig = 4;
            this.NO_PO.OldVersion = false;
            this.NO_PO.OverFlow = true;
            this.NO_PO.StartValue = 1;
            this.NO_PO.Step = 1;
            this.NO_PO.TargetColumn = "NO_PO";
            this.NO_PO.UpdateComp = this.ucPPO_PO1_M;
            // 
            // tsQTY_PO1
            // 
            this.tsQTY_PO1.Name = "tsQTY_PO1";
            transaction1.AutoNumber = null;
            transField1.DesField = "QT_PO_END";
            transField1.DesValue = null;
            transField1.FieldType = null;
            transField1.FieldTypeName = null;
            transField1.ReadOnly = false;
            transField1.SrcField = "QT_QTY";
            transField1.SrcGetValue = null;
            transField1.SrcValue = null;
            transField1.UpdateMode = Srvtools.UpdateMode.Inc;
            transaction1.TransFields.Add(transField1);
            transKeyField1.DesField = "NO_PR";
            transKeyField1.DesValue = null;
            transKeyField1.FieldType = null;
            transKeyField1.FieldTypeName = null;
            transKeyField1.ReadOnly = false;
            transKeyField1.SrcField = "NO_PR";
            transKeyField1.SrcGetValue = null;
            transKeyField1.SrcValue = null;
            transKeyField1.WhereMode = Srvtools.WhereMode.WhereOnly;
            transKeyField2.DesField = "CN_SEQ";
            transKeyField2.DesValue = null;
            transKeyField2.FieldType = null;
            transKeyField2.FieldTypeName = null;
            transKeyField2.ReadOnly = false;
            transKeyField2.SrcField = "CN_SEQ2";
            transKeyField2.SrcGetValue = null;
            transKeyField2.SrcValue = null;
            transKeyField2.WhereMode = Srvtools.WhereMode.WhereOnly;
            transKeyField3.DesField = "ID_VEND";
            transKeyField3.DesValue = null;
            transKeyField3.FieldType = null;
            transKeyField3.FieldTypeName = null;
            transKeyField3.ReadOnly = false;
            transKeyField3.SrcField = "ID_VEND";
            transKeyField3.SrcGetValue = null;
            transKeyField3.SrcValue = null;
            transKeyField3.WhereMode = Srvtools.WhereMode.WhereOnly;
            transaction1.TransKeyFields.Add(transKeyField1);
            transaction1.TransKeyFields.Add(transKeyField2);
            transaction1.TransKeyFields.Add(transKeyField3);
            transaction1.TransMode = Srvtools.TransMode.Exception;
            transaction1.TransStep = 0;
            transaction1.TransTableName = "PPO_PR1_D";
            transaction1.WhenDelete = true;
            transaction1.WhenInsert = true;
            transaction1.WhenUpdate = true;
            this.tsQTY_PO1.Transactions.Add(transaction1);
            this.tsQTY_PO1.UpdateComp = this.ucPPO_PO1_D;
            // 
            // PR1_D
            // 
            this.PR1_D.CommandText = resources.GetString("PR1_D.CommandText");
            this.PR1_D.CommandTimeout = 30;
            this.PR1_D.CommandType = System.Data.CommandType.Text;
            this.PR1_D.EEPAlias = null;
            this.PR1_D.InfoConnection = this.InfoConnection1;
            keyItem6.KeyName = "NO_PR";
            keyItem7.KeyName = "CN_SEQ";
            this.PR1_D.KeyFields.Add(keyItem6);
            this.PR1_D.KeyFields.Add(keyItem7);
            this.PR1_D.Name = "PR1_D";
            this.PR1_D.NotificationAutoEnlist = false;
            this.PR1_D.SecExcept = null;
            this.PR1_D.SecFieldName = null;
            this.PR1_D.SecStyle = Srvtools.SecurityStyle.ssByNone;
            this.PR1_D.SelectTop = 0;
            this.PR1_D.SiteControl = false;
            this.PR1_D.SiteFieldName = null;
            this.PR1_D.Transaction = null;
            this.PR1_D.UpdatedRowSource = System.Data.UpdateRowSource.Both;
            // 
            // MasterView
            // 
            this.MasterView.CommandText = "select [PPO_PO1_M].* from [PPO_PO1_M] where CD_PO2=\'1\'";
            this.MasterView.CommandTimeout = 30;
            this.MasterView.CommandType = System.Data.CommandType.Text;
            this.MasterView.EEPAlias = null;
            this.MasterView.InfoConnection = this.InfoConnection1;
            keyItem8.KeyName = "NO_PO";
            this.MasterView.KeyFields.Add(keyItem8);
            this.MasterView.Name = "MasterView";
            this.MasterView.NotificationAutoEnlist = false;
            this.MasterView.SecExcept = null;
            this.MasterView.SecFieldName = null;
            this.MasterView.SecStyle = Srvtools.SecurityStyle.ssByNone;
            this.MasterView.SelectTop = 0;
            this.MasterView.SiteControl = false;
            this.MasterView.SiteFieldName = null;
            this.MasterView.Transaction = null;
            this.MasterView.UpdatedRowSource = System.Data.UpdateRowSource.Both;
            // 
            // RPT_Master
            // 
            this.RPT_Master.CommandText = resources.GetString("RPT_Master.CommandText");
            this.RPT_Master.CommandTimeout = 30;
            this.RPT_Master.CommandType = System.Data.CommandType.Text;
            this.RPT_Master.EEPAlias = null;
            this.RPT_Master.InfoConnection = this.InfoConnection1;
            keyItem9.KeyName = "NO_PO";
            this.RPT_Master.KeyFields.Add(keyItem9);
            this.RPT_Master.Name = "RPT_Master";
            this.RPT_Master.NotificationAutoEnlist = false;
            this.RPT_Master.SecExcept = null;
            this.RPT_Master.SecFieldName = null;
            this.RPT_Master.SecStyle = Srvtools.SecurityStyle.ssByNone;
            this.RPT_Master.SelectTop = 0;
            this.RPT_Master.SiteControl = false;
            this.RPT_Master.SiteFieldName = null;
            this.RPT_Master.Transaction = null;
            this.RPT_Master.UpdatedRowSource = System.Data.UpdateRowSource.Both;
            // 
            // RPT_Detail
            // 
            this.RPT_Detail.CommandText = resources.GetString("RPT_Detail.CommandText");
            this.RPT_Detail.CommandTimeout = 30;
            this.RPT_Detail.CommandType = System.Data.CommandType.Text;
            this.RPT_Detail.EEPAlias = null;
            this.RPT_Detail.InfoConnection = this.InfoConnection1;
            keyItem10.KeyName = "NO_PO";
            keyItem11.KeyName = "CN_SEQ";
            this.RPT_Detail.KeyFields.Add(keyItem10);
            this.RPT_Detail.KeyFields.Add(keyItem11);
            this.RPT_Detail.Name = "RPT_Detail";
            this.RPT_Detail.NotificationAutoEnlist = false;
            this.RPT_Detail.SecExcept = null;
            this.RPT_Detail.SecFieldName = null;
            this.RPT_Detail.SecStyle = Srvtools.SecurityStyle.ssByNone;
            this.RPT_Detail.SelectTop = 0;
            this.RPT_Detail.SiteControl = false;
            this.RPT_Detail.SiteFieldName = null;
            this.RPT_Detail.Transaction = null;
            this.RPT_Detail.UpdatedRowSource = System.Data.UpdateRowSource.Both;
            // 
            // infoDataSource1
            // 
            this.infoDataSource1.Detail = this.RPT_Detail;
            columnItem3.FieldName = "NO_PO";
            this.infoDataSource1.DetailColumns.Add(columnItem3);
            this.infoDataSource1.DynamicTableName = false;
            this.infoDataSource1.Master = this.RPT_Master;
            columnItem4.FieldName = "NO_PO";
            this.infoDataSource1.MasterColumns.Add(columnItem4);
            ((System.ComponentModel.ISupportInitialize)(this.InfoConnection1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.PPO_PO1_M)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.PPO_PO1_D)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.View_Provider)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.PR1_D)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.MasterView)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.RPT_Master)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.RPT_Detail)).EndInit();

        }

        #endregion
    }
}
